import React from "react";
import { NavBar } from "antd-mobile";
import PropTypes from "prop-types";

NavHeader.propTypes = {
  title: PropTypes.string.isRequired,
  onBack: PropTypes.func,
};

export default function NavHeader(props) {
  return (
    <>
      <NavBar {...props}>
        {props.title}
        {props.children}
      </NavBar>
    </>
  );
}
